import request from "@/utils/request";

// 创建第三方应用信息
export function createInfoThirdAliApp(data) {
  return request({
    url: "/alipay/info-third-ali-app/create",
    method: "post",
    data: data,
  });
}

// 更新第三方应用信息
export function updateInfoThirdAliApp(data) {
  return request({
    url: "/alipay/info-third-ali-app/update",
    method: "put",
    data: data,
  });
}

// 删除第三方应用信息
export function deleteInfoThirdAliApp(id) {
  return request({
    url: "/alipay/info-third-ali-app/delete?id=" + id,
    method: "delete",
  });
}

// 获得第三方应用信息
export function getInfoThirdAliApp(id) {
  return request({
    url: "/alipay/info-third-ali-app/get?id=" + id,
    method: "get",
  });
}

// 获得第三方应用信息分页
export function getInfoThirdAliAppPage(query) {
  return request({
    url: "/alipay/info-third-ali-app/page",
    method: "get",
    params: query,
  });
}

// 导出第三方应用信息 Excel
export function exportInfoThirdAliAppExcel(query) {
  return request({
    url: "/alipay/info-third-ali-app/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
// 构建版本 上传代码
export function uploadAppVersion(data) {
  return request({
    url: "/alipay/mini-program/uploadAppVersion?authAppId=" + data.authAppId,
    method: "get",
  });
}
// 提交审核
export function auditAppVersion(data) {
  return request({
    url: "/alipay/mini-program/auditAppVersion?authAppId=" + data.authAppId,
    method: "get",
  });
}
// 发布
export function onlineAppVersion(data) {
  return request({
    url: "/alipay/mini-program/onlineAppVersion?authAppId=" + data.authAppId,
    method: "get",
  });
}

// 删除 构建版本
export function deleteAppVersion(data) {
  return request({
    url: "/alipay/mini-program/delAppVersion?authAppId=" + data.authAppId,
    method: "get",
  });
}

// 撤销审核
export function cancelAuditAppVersion(data) {
  return request({
    url: "/alipay/mini-program/cancleAppVersion?authAppId=" + data.authAppId,
    method: "get",
  });
}
